In order to look for errors in software programs (an activity referred to as “debugging”), some software development tools provide the ability to record the sequence of operations that a processor performed while executing a program. This is referred to as tracing the execution of the program, and the information that is captured is referred to as trace data. The trace data may comprise data such as values in various processor registers during execution of a traced program, and the addresses of instructions the processor performed while executing a traced program.
However, some traced programs use overlays. Overlays are sequences of code and/or data bytes that are stored in slower (and thus less expensive) memory and are linked to run at a common address range in faster (and thus more expensive) memory, called an ‘overlay region’. When a program determines that it needs access to the content associated with an overlay, the program copies the overlay into the faster memory so that it aligns with the addresses at which the overlay was lined to run. Overlays are used in time-critical applications where deterministic operation of the program is required, deterministic in this case refers to the ability of the programmer to determine ahead of time the worst-case path through a program, how much time it will take to execute that path, and thus to determine the longest amount of time to execute the code. The hardware cache systems found in modern processors are often unsuitable for these types of applications because they are inherently non-deterministic: interrupts, task switches or other events that occur during the execution of a program evict various address regions from cache, causing them to execute more slowly the next time they are accessed.
In systems using overlays, over time a plurality of overlay programs may execute from the same series of addresses. For a trace-debug program looking only at the sequence of addresses executed by the processor, it is difficult to determine which overlay was executed. Moreover, in software programs where multiple tasks are performed substantially simultaneously, and where those tasks communicate with and rely on each other to perform the overall task of the software program, one or more of the tasks may consume excessive processor time and slow overall system performance. However, when debugging the software program it is difficult to determine which of the many tasks consume excessive processor time.